/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.risk.hid.vo;

import com.hopes.bizz.risk.common.constant.enums.RiskSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 隐患处理记录
 *
 * @author pig
 * @date 2023-07-19 10:14:31
 */
@Data
public class RiskHidHandleRecordVO {

    private static final long serialVersionUID = 1L;


    /**
     * 标识
     */
    private Long id;

    /**
     * 隐患标识
     */
    private Long hidId;

    /**
     * 节点编码
     */
    private Integer nodeCode;

    /**
     * 处理人
     */
    private Long handleUserId;

    /**
     * 处理结果
     */
    private String handleResult;

    /**
     * 处理描述
     */
    private String handleResultDesc;

    /**
     * 处理图片
     */
    private String handlePhoto;

    /**
     * 处理视频
     */
    private String handleVideo;

    /**
     * 下一处理人部门
     */
    private Long nextDeptId;

    /**
     * 下一处理人
     */
    private Long nextUserId;

    /**
     * 执行候选人
     */
    private String executor;

    /**
     * 处理数据
     */
    private String handleData;

    /**
     * 处理时间
     */
    private Date handleDate;

    /**
     * 签名图片
     */
    private String signature;

    /**
     * 机构ID
     */
    private Long orgId;

    private LocalDateTime createTime;


    public String getNodeCodeStr() {
        return DictResolver.getItemByValue(RiskSysDictEnum.hidden_danger_status, this.nodeCode.toString()).getExt1();
    }

    public String getHandleUserIdStr() {
        return DictResolver.getItemLabelByValue(AdminDictEnum.sys_user, this.handleUserId);
    }

    public String getExecutorStr() {
        return DictResolver.getItemLabelByValue(AdminDictEnum.sys_user, this.executor);
    }

    public String getHandleResultStr() {
        return DictResolver.getItemLabelByValue(RiskSysDictEnum.hidden_danger_audit_status, this.handleResult);
    }
}
